<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<link rel="stylesheet" type="text/css" href="css/reset.css"/>
		<link rel="stylesheet" type="text/css" href="css/shoppingbag.css"/>
	</head>
	<body>
		<header></header>
		<section>
			      <div class="banxin">
			        <div class="contentHead">
			          <!-- <i></i> -->
			          <span>购物袋</span>
			        </div>
			        <!-- 空购物袋 -->
			        <div class="cart_0" style="display: none;">
			          <div class="img">
			            <img alt="" src="img/index/cart_0_ico.png" />
			          </div>
			          <p>购物袋空空如也</p>
			          <button style="border:1px solid #0f0b00; background: none; width: 200px; height: 42px; padding: 0;">
			            <a href="index.html" style="display: block; width: 100%; height: 100%; line-height: 42px; font-size: 18px;">
			              去逛逛
			            </a>
			            </button>
			        </div>
			
			        <!-- 购物袋有商品 -->
			        <div class="cart_1">
			          <div class="title">
			            <span>我的购物袋</span>
			            <button class="manage">管理</button>
			            <button class="finish">完成</button>
			          </div>
			          <ul class="cartList">
			          <!--  <li>
			                  <div>
			                    <input class="check" type="checkbox" name="shop" id="" />
			                    <div class="shop">
			                      <div class="img">
									  <div id="goodsid">
									  	001
									  </div>
			                        <img src="../images/cart/cartShop1.png" alt="" />
			                      </div>
			                      <div class="shopInfo">
			                        <p class="name">凝时鲜颜肌活修护精华液</p>
			                        <p class="size">35ml</p>
			                        <p class="price">¥180</p>
			                      </div>
			                      <div class="step">
			                        <i class="reduce">-</i>
			                        <input type="text" value="1" onkeyup="value=value.replace(/[\D]/g,'')" maxlength="2" class="num" />
			                        <i class="plus">+</i>
			                      </div>
			                    </div>
			                </li> -->
			          </ul>
			          <!-- 全选、结算 -->
			          <div class="bottom">
			            <div class="box">
			              <label>
			                <input class="allCheck" id="" name="allCheck" type="checkbox" />
			                <span>全选</span>
			              </label>
			              <div class="totalPay">
			                <p>合计：</p><p class="allPrice">¥0.00</p><p></p>
			                <button class="pay" type="1">
			                  结算
			                  <!-- <a href="./buy.html">结算</a> -->
			                </button>
			              </div>
			              <!-- 管理 -->
			              <div class="manageBtns">
			                <button class="addCollection">移入心愿单</button>
			                <button class="cancel">删除</button>
			              </div>
			            </div>
			          </div>
			        </div>
			      </div>
	
		</section>
		<footer id="footer"></footer>
	</body>
</html>
<script src="js/jQuery.js" type="text/javascript" charset="utf-8"></script>
<script src="js/cookieTools.js" type="text/javascript" charset="utf-8"></script>
<script src="./js/shoppingbag.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
let goodId;
	$(".manageBtns .cancel").click(function(){
		$(".cartList .check").each(function(){
		    if(this.checked==true){
				 goodId=$(this).next().find(".goodsid").html();
				 delect(vipName,goodId);
				 logincar();
			}})
	})
	
	function delect(vipName,goodId){
		$.get("php/deleteGoods.php",{
		"vipName":vipName,
		"goodsId":goodId
		},function(resText,status,xhr){
			if(resText==1){
				alert("删除成功");
				// alter("删除成功");
			window.location ="shoppingbag.html";
			}else{
				// alter("删除失败");
				console.log(222222222222);
			}
			
			
		});
	}
	
	function fun(vipName,goodId,good){
		$.get("php/updateGoodsCount.php",{
		"vipName":vipName,
		"goodsId":goodId,
		"goodsCount":good
		},function(resText,status,xhr){
			if(resText==1){
		
			}else{
		
			}
			
			
		});
	}
	
	
	
</script>